import { SysSystem } from '@/model/system/system';
import Http from '../http';
import { UpdateIsOpenInPut } from '@/model/public/public';


export const getSystemList = async function () {
  return await Http.get('/api/SysSystem/GetSystemList');
}

//获取所有系统-select结构
export const getAllSystemSelect = async function(params?: { corporationKey?: string }) {
   return await Http.get('/api/SysSystem/GetAllByCorporationKey',params);
}

//新增系统
export const insert = function (sysSystem: SysSystem) {
  return Http.post('/api/SysSystem/Insert', sysSystem)
}

//编辑系统
export const update = function (sysSystem: SysSystem) {
  return Http.post('/api/SysSystem/Update', sysSystem)
}

//设置系统是否启用
export const SetSystemIsOpen = function (updateIsOpenInPut: UpdateIsOpenInPut) {
  return Http.post('/api/SysSystem/SetSystemIsOpen', updateIsOpenInPut)
}